package cn.hdu.liang.innerclasses;

class Egg {
    private Yolk y;

    protected class Yolk {
        public Yolk() {
            System.out.println("Egg.Yolk.Yolk");
        }
    }

    public Egg() {
        System.out.println("new Egg()");
        y = new Yolk();
    }

}

public class BigEgg extends Egg {
    public class Yolk {
        public Yolk() {
            System.out.println("BigEgg.Yolk.Yolk");
        }
    }

    public static void main(String[] args) {
        new BigEgg();
    }
}
